﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Shut;

public partial class master_main : System.Web.UI.MasterPage
{
	
    protected void Page_Load(object sender, EventArgs e)
    {
		if (SiteSettings.Instance.DebugMode){
			TocNode.GetNode("Dev").Visible = true;
		}
		hlHome.HRef = TocNode.GetNode("Homepage").Url;
		// here all languages can be added
		//if (((UiPage)Page).forcePageDirection){
		//    hlAr.Visible = false; // dont allow link to appear if page exists in one direction
		//}else if (((UiPage)Page).pageDirection == "ltr"){
		//    hlAr.CssClass ="rtl";
		//    hlAr.Text = "عربي";
		//}

		
    }
	//protected void hlAr_Click(object sender, EventArgs e)
	//{
	//    // set site direction to rtl, then save in cookie, then read cookie, do the same for culture even tho culture should be read from a different hyperlink but there is no need for this project

	//    BaseUser.SetUserSiteDirection((SiteSettings.Instance.SiteDirection == "rtl") ? "ltr" : "rtl");
	//    BaseUser.SetUserCulture((SiteSettings.Instance.SiteDirection == "rtl") ? "en" : "ar");
	//    Response.Redirect(TocNode.CurrentNode.Url);
	//}
}
